package com.wurao.util.alipay;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {
	// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2016091000482367";
	
	// 收款支付宝账号，一般情况下收款账号就是签约账号
	public static String seller_email = "a1065026516@qq.com";

	// 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCJxBXj3tTAooqZpVjAAvGjXhKEWgbiXUiLW8+64bbsEfHcwoQ5BY4i1aZSNvBP+1sJm451GI/1emCHYy5DGBQm06JwCX4bJtoCTuI3N7myug68oDQzfW4lsubY6CSngDZtJrNjjuXtofsbeKWHMcEkRN57i9sj1ohwCXVsvrIXGqbt7NWaaG0VHrN7+ac2KbpamYkPtpk4UOxJaTvqdXwyVrj4WoeClzHEhtuprCXa8q5D8I4/HbxLvK+Zxnr7pORcJHooqbdGw0OpWvA2TvAsW4cWY8TUE/8k8uV/nlf2G7tnEBPKnS81bRBcRKLhuuMIPspjCd18SiFlKTSs9zW3AgMBAAECggEAZfCQehLyvrAHevWcnEgRYV9EuGadXXbFLUl8hr5qSnhkzYOprz/rEt+guIkqfSRzEsLmQMMyEuTA9K1xF/iDQM+tDNYZWCIBg1+3iEBVymheazjoJ4mSrZaZtrrgFImMvGu8pdihTptjYcp+QXGRhzLmpeiw+O3P+4ckOplI0kqyPGpkkhP4nkleXVv85ecmeP8BXU0MN8vsRNbvpfkpWbmFqDiTLsyv0Wj+gD/FlG0dJN9IHOvieLoNBfPy162wtA0eFIBPwDHagaohkmNiyKNA0t+ruRQXY/22XQcEumeE+1g8wAGZoCICdQNaXDaxKeNenToEdajygOmO0ic/oQKBgQDDwNTVloPeXhrZelRUr93/PmRXTNJaa01VedS53pLfxMZd3byTXxqxzZRxx/HS3LuG3O1FD83s+PindH/cO2aH8ZActbWlhbUR106RUVuZKBMPHkW9UqeR4SER+tmQsEPck49mhxGbj8mAjPWEXF9SArBY6Q2KBRiXvft5eWfaKQKBgQC0KoDztm+4CZ73ZWVfA+osRSeNMShAgbwUUgdKxTy/kidBEbyLGa26hNI2T1Q9XoLo7kTreIrHj1hHMrCg/cBxtpO4ZdEx5oyMlGWRmglTeBf6gfssl4W+EJ43gnWwjhcjIcX1PIsdOCIYqvgqslRI5ZrmKROIwOmjBlEHMFxM3wKBgAmSs5Xib35/caazEc62bw/deEDAtATR/I0ykRGp7drdn6nVfzRh0Udiu2C5G31paA5XXY8kD7kID/j4fIxDp2b8jESrKj/3AvzlX6VBqk4aJJx3qYdxtFow/VIIx30I8bimyruD3XuTE5Ki0hrv/YVgNkmS1COsziAVnWe6ZTbJAoGAEcc78FCpV4zDfgAob6bQPcwZKgqWwT7ME2lAxPUPmIvQidA5PbSr+wLOR4OueVvRKTER5faAI08W0/fBjDFeAxqUGxcY/IaWiey+1Q5RK0Znf1XCNlVBYk77fdjGykRLLjFP+nId/CUk4DBGytfMD2Fw1pNpFQ6MP4UJC9+OzBsCgYBivJ+6jYqVE1NJFGSKhFcVMBS0VlkV551QkzM+KxbOEsL6TSVUx84hEPTkrP3jKF8/LviAaKFfrIdoR6kWXYFkwVaT+eizrB84tYsDKrFPg9xWR0uXejf6HM6/hczY0SxRmhGduNaLiKYQV4VUxmNymCa2BDjk+/b8xx4kWBfP8g==";
	
	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4gjFKoyvNA2b33X6CdHqM8ng6KhMuW1lHWWJsqO76BUuSDY8WcgGcnaaybmP5Vf7cix/8Woi3IJrXXmYm8ToKeXjSKFM2/tJ1IqnOEoy2L1dkUhy19onfeTLnihEQiRHWLHcrBwcP7ILqPOz2IqPy+65IU7rTQHolYZdk5U+BjLxl/ff/jdzxY8wU1Uk1aA3BiV/Q96Hlf47i6cFKPZHNKtuTysGfZxvKCF1ScIvq/0BTzPaGXwVGadnYNjJXZhpPrPEqK5wotH+h5nAIVTeL+ADbV5r2pbVv4dxVtMZWJdq6T0VrzzYjRDzPfYH8UY3H3I00Q91x2KyLdJPphXMYQIDAQAB";

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问http://localhost:2052/pay/alipayNotifySucc.html
	public static String notify_url = "";
	
	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String return_url = "http://www.wurao.xin/pay/alipayReturnSucc.html";

	// 签名方式
	public static String sign_type = "RSA2";
	
	// 字符编码格式
	public static String charset = "utf-8";
	
	// 支付宝网关
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
	
	// 支付宝网关
	public static String log_path = "C:\\";
			

	//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
			
	/** 
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
